<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="jakarta.tags.core" prefix="c" %>
<%@ taglib uri="jakarta.tags.fmt" prefix="fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>所有的图书</h1>

<c:set var="now" value="<%= new java.util.Date() %>"/>
<h3>查询时间：<fmt:formatDate value="${now}" pattern="hh:mm:ss"></fmt:formatDate></h3>
<table>
    <c:forEach items="${books}" var="book">
        <tr>
            <td>${book.id}</td>
            <td>${book.name}</td>
            <td><fmt:formatNumber value="${book.price}" type="currency"/></td>
            <td>
                <fmt:formatDate value="${book.publishDate}" pattern="yyyy年MM月dd"/>
            </td>
        </tr>
    </c:forEach>
</table>


</body>
</html>
